import App from './App'
import mixin from './common/mixin'
import { store,key } from './store';
import tools from './common/tools'
import mixinTools from './common/mixinTools'
import request from './request'

import popup from './components/mix-popup/mix-popup.vue';
import emptyTxt from './components/emptyTxt.vue';
import submitBtn from './components/submit-btn.vue';
import singleList from './components/single-list.vue';
import safeArea from './components/safe-area.vue'





// uni.getSystemInfo({
// 	success: (e)=> {
// 		Vue.prototype.$isIOS = e.osName === 'ios';
// 	}
// })


// #ifndef VUE3
import Vue from 'vue'
Vue.component('popup',popup)
Vue.component('empty',emptyTxt)
Vue.component('submitBtn',submitBtn)
Vue.component('singleList',singleList)
Vue.component('safeArea',safeArea)
Vue.mixin(mixin);
  
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3

import { createSSRApp } from 'vue'
uni.$store = store;
uni.$tools = tools;
uni.$this= mixinTools;
uni.$request = request;

export function createApp() {
  const app = createSSRApp(App)
  app.component('popup',popup)
  app.component('empty',emptyTxt)
  app.component('submitBtn',submitBtn)
  app.component('singleList',singleList)
  app.component('safeArea',safeArea)
  app.mixin(mixin);
  app.use(store, key);
  return {
    app
  }
}
// #endif
